package cn.zjweu.domain;

import java.io.Serializable;

/*
 * 用于封装后端返回前端数据对象
 */
public class ResultInfo implements Serializable {

    /*后端返回结果正常为true，发生异常返回false*/
    private boolean flag;
    /*后端返回结果数据对象*/
    private Object data;
    /*返回对应提示消息*/
    private String infoMsg;

    public ResultInfo() {
    }

    public ResultInfo(boolean flag) {
        this.flag = flag;
    }

    public ResultInfo(boolean flag, String infoMsg) {
        this.flag = flag;
        this.infoMsg = infoMsg;
    }

    public ResultInfo(boolean flag, Object data, String infoMsg) {
        this.flag = flag;
        this.data = data;
        this.infoMsg = infoMsg;
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public String getInfoMsg() {
        return infoMsg;
    }

    public void setInfoMsg(String infoMsg) {
        this.infoMsg = infoMsg;
    }
}
